﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Common.ascx.cs" Inherits="Updms.Common.Inc.Common" %>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<link href="../Common/Images/favicon.ico" rel="shortcut icon" />
<link href="../Common/Css/default.css" type="text/css" rel="stylesheet" />
<link href="../Common/Css/button.css?ver=<%= SetTimeStamp() %>" type="text/css" rel="stylesheet" />
<link href="../Common/Css/layout_v3.5.1.css?ver=<%= SetTimeStamp() %>" type="text/css" rel="stylesheet" />
<link href="../Common/Css/main_v3.5.1.css?ver=<%= SetTimeStamp() %>" type="text/css" rel="stylesheet" />
<link href="../Common/Css/msgBox.css" type="text/css" rel="stylesheet" />
<%= ImportLanguagePack()%>
<script type="text/javascript" language="javascript" src="../Common/Js/common_v3.5.1.js?ver=<%= SetTimeStamp() %>"></script>
<script type="text/javascript" language="javascript" src="../Common/Js/updms_v3.5.1.js?ver=<%= SetTimeStamp() %>"></script>
<script type="text/javascript" language="javascript" src="../Common/Js/msgBox.js"></script>
<script type="text/javascript" language="javascript" src="../Common/Js/prototype.js"></script>
<script type="text/javascript">
// <![CDATA[
	var _slideMenu, currentMenu;
	
	function initMenu() {
		var root = document.getElementById("duiSlideMenu").getElementsByTagName("ul")[0];
		_slideMenu = dui.SlideMenu.makeSlideMenu(root);
		_slideMenu.beforeOpen = function(menu) { 
			menu.firstChild.className = "dui_open";
		}
		_slideMenu.afterClose = function(menu) { 
			menu.firstChild.className = "dui_closed";
		}
						
		var links = root.getElementsByTagName("li");
		for (var i = 0; i < links.length; i++) {
			links[i].onclick = function(aEvent){
				if (aEvent) {
					aEvent.stopPropagation();
				}else{
					window.event.cancelBubble = true;
				}
				 
		 if (this.className && this.className == "dui_current") {}
		 else this.className += " dui_current";
		 
		 if (currentMenu) {
			 if(currentMenu.parentNode == this.parentNode) currentMenu.className = currentMenu.className.substr(0, currentMenu.className.length-9);
			 else if(currentMenu.parentNode.parentNode.parentNode == this.parentNode) { 
				 currentMenu.className = currentMenu.className.substr(0, currentMenu.className.length-9);
				 currentMenu.parentNode.parentNode.className = currentMenu.parentNode.parentNode.className.substr(0, currentMenu.className.length-9);
			 } else if(currentMenu.parentNode.parentNode.parentNode.parentNode.parentNode == this.parentNode) {
				 currentMenu.className = currentMenu.className.substr(0, currentMenu.className.length-9);
				 currentMenu.parentNode.parentNode.className = currentMenu.className.substr(0, currentMenu.parentNode.parentNode.className.length-9);
				 currentMenu.parentNode.parentNode.parentNode.parentNode.className = currentMenu.parentNode.parentNode.parentNode.parentNode.className.substr(0, currentMenu.className.length-9);
			 } 
			 else if(currentMenu.parentNode.parentNode.parentNode == this.parentNode.parentNode.parentNode) currentMenu.className = currentMenu.className.substr(0, currentMenu.className.length-9);		 
		 }
		 currentMenu = this;
		 
		 if(this.childElements()[this.childElements().length-1].tagName == "UL") {
			 var childObjs = this.childElements()[this.childElements().length-1].childElements();
			 for(var j=0; j<childObjs.length; j++) {
				 if(childObjs[j].state == "open") { 
					 currentMenu = childObjs[j];
					 break;
				 }
			 } 
		 }
		 
		 
		 }
		 if(links[i].className.indexOf("dui_current")>-1) currentMenu = links[i];
		}
	}	
	<%= ImportSlideMenuInitScript() %>
// ]]>
</script>